﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FocusImageManage.aspx.cs" Inherits="Catering.Catering_Page.system.FocusImageManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../../Scripts/zhezhao.js" type="text/javascript"></script>
    <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/head.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/center.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link href="../../Style/center.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        *
        {
            margin: 0px;
            padding: 0px;
        }
        body
        {
            font-size: 12px;
        }
        .focusimgul{width:100%; padding:0px; margin:0px; clear:both;}
        .focusimgul .focusimgli{ float:left; width:145px; height:54px; margin-left:10px; padding:0px; }
        .YLDiv{margin:10px 0px; padding:0px; text-align:center;}
        .YLDiv Image{ width:673px; height:312px; border:0px; float:left;}
        .YLDiv B{color:Red; font-size:13px;}
    </style>
    <script type="text/javascript">
        //检测程序
        var exts = "jpg";
        function CheckPreview() {
            var obj = document.getElementById("Imgfile");
            var value = obj.value, check = true;
            if (!value) {
                check = false; alert("请先选择文件！");
            } else if (!RegExp("\.(?:" + exts + ")$$", "i").test(value)) {
                check = false; alert("只能上传以下类型：" + exts);
            }
            return check;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="height:36px; line-height:36px; font-size:13px;">&nbsp;&nbsp;当前位置：首页图片维护</div>
    <div class="focusimgul">
        <div class="focusimgli"><img title="01.jpg" src="../../Images/01.jpg?i=<%=m_UpState %>" width="145" height="54" border="0" /></div>
        <div class="focusimgli"><img title="02.jpg" src="../../Images/02.jpg?i=<%=m_UpState %>" width="145" height="54" border="0" /></div>
        <div class="focusimgli"><img title="03.jpg" src="../../Images/03.jpg?i=<%=m_UpState %>" width="145" height="54" border="0" /></div>
        <div class="focusimgli"><img title="04.jpg" src="../../Images/04.jpg?i=<%=m_UpState %>" width="145" height="54" border="0" /></div>
        <div class="focusimgli" style="margin-right:0px;"><img alt="title.jpg?i=<%=m_UpState %>" src="../../Images/05.jpg" width="145" height="54" border="0" /></div>
    </div>
    <div class="clear_div" style="height:0px;"></div>  
    <div style="clear:both; margin:0px 20px;">
        <asp:Label ID="Label2" runat="server"  style="height:22px; vertical-align:middle;" Text="要修改的图片："></asp:Label>
        <%if (m_UpState == 2)
          { %>
        <asp:DropDownList ID="Dr_Image1" runat="server"  Enabled="false" CssClass="select_input_bg" Width="80">
        <asp:ListItem Value="01.jpg">01.jpg</asp:ListItem>
        <asp:ListItem Value="02.jpg">02.jpg</asp:ListItem>
        <asp:ListItem Value="03.jpg">03.jpg</asp:ListItem>
        <asp:ListItem Value="04.jpg">04.jpg</asp:ListItem>
        <asp:ListItem Value="05.jpg">05.jpg</asp:ListItem>
        </asp:DropDownList>
         <%}
          else
          {%>
          <asp:DropDownList ID="Dr_Image" runat="server" CssClass="select_input_bg" Width="80">
        <asp:ListItem Value="01.jpg">01.jpg</asp:ListItem>
        <asp:ListItem Value="02.jpg">02.jpg</asp:ListItem>
        <asp:ListItem Value="03.jpg">03.jpg</asp:ListItem>
        <asp:ListItem Value="04.jpg">04.jpg</asp:ListItem>
        <asp:ListItem Value="05.jpg">05.jpg</asp:ListItem>
        </asp:DropDownList>
        <%} %>
        <asp:FileUpload ID="Imgfile" style="height:22px; vertical-align:middle;" runat="server" />
        <asp:HiddenField ID="HF_Save" runat="server" />
        <%if (m_UpState == 2)
        { %>
        <asp:Button ID="Button2" runat="server" style="height:22px; vertical-align:middle;" Text=" 保 存 " onclick="Button2_Click" />
        <asp:Button ID="Button3" runat="server" style="height:22px; vertical-align:middle;" Text=" 撤 销 " onclick="Button3_Click" />
        <%} 
        else
        {%>
        <asp:Button ID="Button1" runat="server" style="height:22px; vertical-align:middle;" Text=" 预 览 " OnClientClick="return CheckPreview()" onclick="Button1_Click" />
        <%}%>
        <asp:Label ID="Label1" runat="server"  style="height:22px; vertical-align:middle;" Text="　（图片尺寸建议使用大小为：673px*312px）"></asp:Label>
        <div class="YLDiv">
            <%if (m_UpState == 1)
              { %>
              <b>您上传文件的类型错误，只能上传jpg类型文件！</b>
            <%}
              else if (m_UpState == 2)
              { %>
              <img alt="首页焦点大图" id="ImgYLContainer" src="../../<%=m_ImageYL %>" />
            <%} 
              else if(m_UpState == 3) 
              {%>
              <b>您没有上传文件！</b>
            <%}%>            
        </div>
    </div>
    <!--弹出层-->
    <div id="bg" runat="server" class="bg"></div>
    </form>
</body>
</html>
